{{{
{{use "jquery", ui=True}}
<script>
$(function(){
    $('select[name=task_sys]').change(function(){
        var el = $(this);
        $.ajax({
          type: 'POST',
          url: "/tasks/get_reqs/"+el.val(),
          dataType: 'json',
          success: function(data){
                var html = "<option value=''></option>";
                for(var j in data){
                    html = html + '<option value=' + data[j][0] + '>' + data[j][1] + '</option>'
                    }
                $('select[name=requirement]').html(html);
            }
        });
        $.ajax({
          type: 'POST',
          url: "/tasks/get_asss/"+el.val(),
          dataType: 'json',
          success: function(data){
                var html = "<option value=''></option>";
                for(var j in data){
                    html = html + '<option value=' + data[j][0] + '>' + data[j][1] + '</option>'
                    }
                $('select[name=assignment]').html(html);
            }
        });
    });
});
</script>
}}}
form.yform
    .group
        p.description | 任务信息
        field name=task_sys
        field name=requirement
        field name=assignment
        field name=name
        field name=stakeholder
        field name=desc
        
    .group
        .line
            p.description | 预计工作量
            field name=amount_inner
            field name=amount_outer
    
    .group
        .line
            p.description | 任务周期
            field name=begin_time
            field name=end_time
    
    .group 
        field name=memo
    
    buttons
        button | 保存
